using System;
using System.Text;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using LeadTracker.Models;

namespace LeadTracker.Models.Tests.Generated
{
	public partial class EditorModelTests
	{

		
		[TestMethod]
		public void UserName_PropertyWriteReadTest()
        {
	
			var objectUnderTest = CreateObject();

			//Setting the value to the current value should always work
			var originalValue = objectUnderTest.UserName;
			objectUnderTest.UserName = originalValue;
			Assert.AreEqual(originalValue, objectUnderTest.UserName);


			//For each of the following, it should either work or throw an ArgumentException 

			try 
			{
				var expectedValue = (string)null;
				objectUnderTest.UserName = expectedValue;
				Assert.IsTrue(objectUnderTest.UserName == null || objectUnderTest.UserName == "");
			}
			catch (ArgumentException) 
			{
				//OK
			}

			try 
			{
				var expectedValue = "";
				objectUnderTest.UserName = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.UserName);
			}
			catch (ArgumentException) 
			{
				//OK
			}

			try 
			{
				var expectedValue = "0";
				objectUnderTest.UserName = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.UserName);
			}
			catch (ArgumentException) 
			{
				//OK
			}
			
			try 
			{
				var expectedValue = "1";
				objectUnderTest.UserName = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.UserName);
			}
			catch (ArgumentException) 
			{
				//OK
			}

			for (int i = 0; i < 100; i++)
			{
				try 
				{
					var expectedValue = new String('a', i);
					objectUnderTest.UserName = expectedValue;
					Assert.AreEqual(expectedValue, objectUnderTest.UserName);
				}
				catch (ArgumentException) 
				{
					//OK
				}
			}
        }

		
		[TestMethod]
		public void FirstName_PropertyWriteReadTest()
        {
	
			var objectUnderTest = CreateObject();

			//Setting the value to the current value should always work
			var originalValue = objectUnderTest.FirstName;
			objectUnderTest.FirstName = originalValue;
			Assert.AreEqual(originalValue, objectUnderTest.FirstName);


			//For each of the following, it should either work or throw an ArgumentException 

			try 
			{
				var expectedValue = (string)null;
				objectUnderTest.FirstName = expectedValue;
				Assert.IsTrue(objectUnderTest.FirstName == null || objectUnderTest.FirstName == "");
			}
			catch (ArgumentException) 
			{
				//OK
			}

			try 
			{
				var expectedValue = "";
				objectUnderTest.FirstName = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.FirstName);
			}
			catch (ArgumentException) 
			{
				//OK
			}

			try 
			{
				var expectedValue = "0";
				objectUnderTest.FirstName = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.FirstName);
			}
			catch (ArgumentException) 
			{
				//OK
			}
			
			try 
			{
				var expectedValue = "1";
				objectUnderTest.FirstName = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.FirstName);
			}
			catch (ArgumentException) 
			{
				//OK
			}

			for (int i = 0; i < 100; i++)
			{
				try 
				{
					var expectedValue = new String('a', i);
					objectUnderTest.FirstName = expectedValue;
					Assert.AreEqual(expectedValue, objectUnderTest.FirstName);
				}
				catch (ArgumentException) 
				{
					//OK
				}
			}
        }

		
		[TestMethod]
		public void LastName_PropertyWriteReadTest()
        {
	
			var objectUnderTest = CreateObject();

			//Setting the value to the current value should always work
			var originalValue = objectUnderTest.LastName;
			objectUnderTest.LastName = originalValue;
			Assert.AreEqual(originalValue, objectUnderTest.LastName);


			//For each of the following, it should either work or throw an ArgumentException 

			try 
			{
				var expectedValue = (string)null;
				objectUnderTest.LastName = expectedValue;
				Assert.IsTrue(objectUnderTest.LastName == null || objectUnderTest.LastName == "");
			}
			catch (ArgumentException) 
			{
				//OK
			}

			try 
			{
				var expectedValue = "";
				objectUnderTest.LastName = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.LastName);
			}
			catch (ArgumentException) 
			{
				//OK
			}

			try 
			{
				var expectedValue = "0";
				objectUnderTest.LastName = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.LastName);
			}
			catch (ArgumentException) 
			{
				//OK
			}
			
			try 
			{
				var expectedValue = "1";
				objectUnderTest.LastName = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.LastName);
			}
			catch (ArgumentException) 
			{
				//OK
			}

			for (int i = 0; i < 100; i++)
			{
				try 
				{
					var expectedValue = new String('a', i);
					objectUnderTest.LastName = expectedValue;
					Assert.AreEqual(expectedValue, objectUnderTest.LastName);
				}
				catch (ArgumentException) 
				{
					//OK
				}
			}
        }

		
		[TestMethod]
		public void EmailAddress_PropertyWriteReadTest()
        {
	
			var objectUnderTest = CreateObject();

			//Setting the value to the current value should always work
			var originalValue = objectUnderTest.EmailAddress;
			objectUnderTest.EmailAddress = originalValue;
			Assert.AreEqual(originalValue, objectUnderTest.EmailAddress);


			//For each of the following, it should either work or throw an ArgumentException 

			try 
			{
				var expectedValue = (string)null;
				objectUnderTest.EmailAddress = expectedValue;
				Assert.IsTrue(objectUnderTest.EmailAddress == null || objectUnderTest.EmailAddress == "");
			}
			catch (ArgumentException) 
			{
				//OK
			}

			try 
			{
				var expectedValue = "";
				objectUnderTest.EmailAddress = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.EmailAddress);
			}
			catch (ArgumentException) 
			{
				//OK
			}

			try 
			{
				var expectedValue = "0";
				objectUnderTest.EmailAddress = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.EmailAddress);
			}
			catch (ArgumentException) 
			{
				//OK
			}
			
			try 
			{
				var expectedValue = "1";
				objectUnderTest.EmailAddress = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.EmailAddress);
			}
			catch (ArgumentException) 
			{
				//OK
			}

			for (int i = 0; i < 100; i++)
			{
				try 
				{
					var expectedValue = new String('a', i);
					objectUnderTest.EmailAddress = expectedValue;
					Assert.AreEqual(expectedValue, objectUnderTest.EmailAddress);
				}
				catch (ArgumentException) 
				{
					//OK
				}
			}
        }

		
		[TestMethod]
		public void IsEnabled_PropertyWriteReadTest()
		{
			var objectUnderTest = CreateObject();
			
			//Setting the value to the current value should always work
			var originalValue = objectUnderTest.IsEnabled;
			objectUnderTest.IsEnabled = originalValue;
			Assert.AreEqual(originalValue, objectUnderTest.IsEnabled);

			try
			{
				var expectedValue = true;
				objectUnderTest.IsEnabled = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.IsEnabled);

			}
			catch (ArgumentException) {
				//OK
			}

			try
			{
				var expectedValue = false;
				objectUnderTest.IsEnabled = expectedValue;
				Assert.AreEqual(expectedValue, objectUnderTest.IsEnabled);
			}
			catch (ArgumentException) {
				//OK
			}
		}

	}
}
